/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package factorysimulation;

/**
 *
 * @author Moustafa Samir
 */
public class Item {

    public enum ItemState {
        GOOD_STATE,
        BAD_STATE
    }
    private ItemState itemState;
    private double arrivalTime;
    private double departureTime;
    private double startService;

    public double getStartService() {
        return startService;
    }

    public void setStartService(double startService) {
        this.startService = startService;
    }

    public ItemState getItemState() {
        return itemState;
    }

    public void setItemState(ItemState itemState) {
        this.itemState = itemState;
    }

    public double getArrivalTime() {
        return arrivalTime;
    }

    public void setArrivalTime(double arrivalTime) {
        this.arrivalTime = arrivalTime;
    }

    public double getDepartureTime() {
        return departureTime;
    }

    public void setDepartureTime(double departureTime) {
        this.departureTime = departureTime;
    }

    public double getServiceTime() {
        return this.departureTime-this.startService;
    }

    public double getResponseTime() {
        return this.departureTime - this.arrivalTime;
    }
    public Item clone(){
        Item item = new Item();
        item.arrivalTime = this.arrivalTime;
        item.departureTime = this.departureTime;
        item.itemState = this.itemState;
        item.startService = this.startService;
        return item;
    }
}
